﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Inventory.Master" AutoEventWireup="true" CodeBehind="SaveProduct.aspx.cs" Inherits="InventryPro.Products.SaveProduct" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <asp:FormView ID="ProductFV"  runat="server"  DataSourceID="ObjProduct"  DataKeyNames="ProductID" OnItemCommand="ProductFV_ItemCommand">
      <InsertItemTemplate  >
         <asp:Label ID="ProductID" runat="server" Text='<%Eval("ProductID")%>'></asp:Label>
            <asp:TextBox ID="ProductName" runat="server" Text='<%Bind("ProductName")%>'></asp:TextBox>
             <asp:TextBox ID="CategoryID" runat="server" Text='<%Bind("CategoryID")%>'></asp:TextBox>
              <asp:TextBox ID="QuantityPerUnit" runat="server" Text='<%Bind("QuantityPerUnit")%>'></asp:TextBox>
               <asp:TextBox ID="UnitPrice" runat="server" Text='<%Bind("UnitPrice")%>'></asp:TextBox>
                <asp:TextBox ID="UnitsInStock" runat="server" Text='<%Bind("UnitsInStock")%>'></asp:TextBox>
                 <asp:LinkButton ID="lbSave" CommandName="SubmitInfo" runat="server">Save</asp:LinkButton>
 <asp:LinkButton ID="lbCancel" CommandName="CancelInsert" runat="server">Cancel</asp:LinkButton>
        </InsertItemTemplate>
        <EditItemTemplate>
         <asp:Label ID="ProductID" runat="server" Text='<%Eval("ProductID")%>'></asp:Label>
            <asp:TextBox ID="ProductName" runat="server" Text='<%Bind("ProductName")%>'></asp:TextBox>
             <asp:TextBox ID="CategoryID" runat="server" Text='<%Bind("CategoryID")%>'></asp:TextBox>
              <asp:TextBox ID="QuantityPerUnit" runat="server" Text='<%Bind("QuantityPerUnit")%>'></asp:TextBox>
               <asp:TextBox ID="UnitPrice" runat="server" Text='<%Bind("UnitPrice")%>'></asp:TextBox>
                <asp:TextBox ID="UnitsInStock" runat="server" Text='<%Bind("UnitsInStock")%>'></asp:TextBox>
                 <asp:LinkButton ID="lbSave" CommandName="UpdateInfo" runat="server">Save</asp:LinkButton>
 <asp:LinkButton ID="lbCancel" CommandName="CancelUpdate" runat="server">Cancel</asp:LinkButton>
        </EditItemTemplate>
        <ItemTemplate>
            <br />
            <asp:Label ID="ProductID" runat="server" Text='<%Eval("ProductID")%>'></asp:Label>
             <asp:Label ID="ProductName" runat="server" Text='<%Eval("ProductName")%>'></asp:Label>
             <asp:Label ID="CategoryID" runat="server" Text='<%Eval("CategoryID")%>'></asp:Label>
              <asp:Label ID="QuantityPerUnit" runat="server" Text='<%Eval("QuantityPerUnit")%>'></asp:Label>
             <asp:Label ID="UnitPrice" runat="server" Text='<%Eval("UnitPrice")%>'></asp:Label>              
             <asp:Label ID="UnitsInStock" runat="server" Text='<%Eval("UnitsInStock")%>'></asp:Label>
              

        </ItemTemplate>
    </asp:FormView>
    <asp:ObjectDataSource ID="ObjProduct" runat="server" DataObjectTypeName="InventoryPro.DAL.InvEntities.Product" />
   
    <p>
    </p>
</asp:Content>
